An interface to make all logging capabilities central. More...
Public Member Functions | |
Logger () | |
virtual | ~Logger () |
virtual void | log (const std::string_view &message, const std::string_view &className)=0 |
An interface to make all logging capabilities central.
A client will inherit from this class and override the log method to output messages wherever is needed. This class is the base of all loggers within the library. Using it, it is possible to reroute all messages logged by the engine.
nkLog::Logger::Logger | ( | ) |
Constructor.
|
virtual |
Destructor.
|
pure virtual |
The method called when a message has been logged.
message | The message to log. |
className | A bonus information to help giving context for the message that has been logged. Typically, it will be the class name (a message from Texture unable to load for instance). |
Implemented in nkLog::FileLogger, and nkLog::ConsoleLogger.